﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace THO7.MyMath
{
    /// <summary>
    /// Provides static functions to calculate angles
    /// </summary>
    public static class Trigonometric
    {
        /// <summary>
        /// Converts an angle in Degrees to an angle in Radians.
        /// </summary>
        /// <remarks>Added by Felix Mann</remarks>
        /// <param name="angle">The angle to convert to Radian</param>
        /// <returns>The angle in Radians</returns>
        public static double DegreeToRadian(this double angle)
        {
            return Math.PI * angle / 180.0;
        }
        /// <summary>
        /// Converts an angle in Radians to an angle in Degrees.
        /// </summary>
        /// <remarks>Added by Felix Mann</remarks>
        /// <param name="angle">The angle to convert to Degrees</param>
        /// <returns>The angle in Degrees</returns>
        public static double RadianToDegree(this double angle)
        {
            return angle * (180.0 / Math.PI);
        }
    }
}
